<?php

namespace App\Exceptions;
use Exception;

class ValidateException extends Exception
{
    public function render() {
        // 将消息存储到session中
        $_SESSION['VALIDATE_MESSAGE'] = $this->getMessage();
        // 跳转到index
        header('location:index.php');
    }
}